package com.trade.wzj.common.yang;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.trade.wzj.service.yang.CompanyPurchaseinfoServiceYang;

@Controller
@RequestMapping("/CompanyPurchaseinfoController")
public class CompanyPurchaseinfoControllerYang {

	@Autowired
	@Qualifier("CompanyPurchaseinfoServiceYang")
	private CompanyPurchaseinfoServiceYang companyPurchaseinfoService;
	
	
	@RequestMapping("/updateClientOrderState")
	@ResponseBody
	public int updateClientOrderState(String stateID, String id) {
		int num = 0;
		try {
			Integer stateid = Integer.parseInt(stateID);
			Integer clientOrderid = Integer.parseInt(id);
			num = companyPurchaseinfoService.updateClientOrderState(stateid, clientOrderid);
		} catch (Exception e) {
			e.printStackTrace();
		} 
		return num;
	}
}
